﻿@page "{id:int}"
@model WebApplication.Pages.EditModel
@{
    ViewData["Title"] = "Edit";
}

<h2>Edit Customer - @Model.Customer.Id</h2>

<form method="post">
    <div asp-validation-summary="All"></div>
    <input asp-for="Customer.Id" type="hidden"/>
    <div>
        <label asp-for="Customer.Name"></label>
        <div>
            <input asp-for="Customer.Name"/>
            <span asp-validation-for="Customer.Name"></span>

        </div>
    </div>
    <div>
        <button type="submit">Save</button>
    </div>
</form>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
